<?
require_once("inc/func.inc.php");
$user_arr = check_user();
$array = array();
$grp = $user_arr['grp'];
$pi_arr=pathinfo(__FILE__);
$fname = $pi_arr['filename'];
chkprv($fname,$grp);
$prv = array();
$prv = get_control_prv($grp);
if(isset($_REQUEST['id']) && $_REQUEST['id']!="")
{
	
}


$sql = "select q.id,q.name,sum(cp.jine) as jin from qudao as q, c_p as cp where q.id=cp.qid group by cp.qid";
$sth = query($sql);
$arr = array();
$pt_arr = array();
while($arr =  mysql_fetch_assoc($sth))
{
	$pt_arr[] = $arr;
}
$tpl->assign('pt_arr',$pt_arr);
$tpl->assign('prv',$prv);
$tpl->display("_qudao_t.html");
?>